{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Chapter5c where

import Yesod
import Data.Text(Text)
import Text.Hamlet(shamlet)
import Text.Blaze.Html (toHtml,Html)

data MyApp = MyApp

type Widget = WidgetT MyApp IO()

page :: Widget
page =[whamlet|
        <p>This is my page. I hope you enjoyed it.
        ^{footer}
        |]
footer = do
    [hamlet|
        <footer>
            <p>That's all folks!
     |]
    [lucius|
        footer{
            font-weight: bold;
            text-align: center
        }
    |]